package com.crm.client;


import com.crm.entity.LayPage;
import com.crm.entity.Member;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "crm-member")
public interface MemberClient {

    @GetMapping("/member/{id}")
    public Member getMemberById(@RequestParam("id") Long id);

    @GetMapping("members/{page}/{size}")
    public LayPage<Member> getMembers(@RequestParam("page") int page, @RequestParam("size") int size, @RequestParam("carId") String carId, @RequestParam("name") String name, @RequestParam("phone") String phone);

    @RequestMapping(value ="/member/post", method = RequestMethod.POST)
    public Member post(@RequestBody Member member);
}
